<template>
  <div class="form-item">
    <label v-if="label">{{label}}</label>
    <div class="form-element">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BwFormItem',
  props: {
    label: String
  }
}
</script>

<style lang="scss" scoped>
.form-item {
  @include wh(100%, 100px);
  @include flex();
  @include border1px(bottom, #a0a0a0);
  background: #fff;
  line-height: 100px;
  min-height: 100px;
  &:last-child {
    &::after {
      display: none;
    }
  }
  label {
    @include wh(160px, 100px);
    font-size: 28px;
    padding: 0 20px;
    color: #666;
  }
  .form-element {
    flex: 1;
  }
}
</style>
